import request from '@/utils/request'

// 学生能力
export function getStudentAbility(queryStudent) {
  return request({
    url: '/teacher/ability/radar/student?studentId=' + queryStudent,
    method: 'get',
    params: { queryStudent }
  })
}

// 班级能力
export function getClassAbility(queryClass) {
  return request({
    url: '/teacher/ability/radar/class?classId=' + queryClass,
    method: 'get',
    params: { queryClass }
  })
}

// 专业能力
export function getMajorAbility(queryMajor) {
  return request({
    url: '/teacher/ability/radar/major?majorId=' + queryMajor,
    method: 'get',
    params: { queryMajor }
  })
}
// 学生学业预警相关接口
export function getWarnings(token) {
  return request({
    url: '/teacher/warning/list',
    method: 'get',
    params: token
  })
}

export function markProcessed(studentId, courseId) {
  return request({
    url: '/teacher/warning/mark-processed',
    method: 'post',
    params: { studentId, courseId }
  })
}
// 学科竞赛获奖相关接口
export function getCompetitionByMajor(majorId) {
  return request({
    url: '/competition/statistics/by-major',
    method: 'get',
    params: { majorId }
  })
}

export function getCompetitionByClass(classId) {
  return request({
    url: '/competition/statistics/by-class',
    method: 'get',
    params: { classId }
  })
}

export function getCompetitionByStudent(studentId) {
  return request({
    url: '/competition/statistics/by-student',
    method: 'get',
    params: { studentId }
  })
}
// 学生成绩趋势相关接口
export function getTrendByStudent(studentId) {
  return request({
    url: '/student/trend/by-student',
    method: 'get',
    params: { studentId }
  })
}

export function getTrendByClass(classId) {
  return request({
    url: '/student/trend/by-class',
    method: 'get',
    params: { classId }
  })
}

export function getTrendByMajor(majorId) {
  return request({
    url: '/student/trend/by-major',
    method: 'get',
    params: { majorId }
  })
}
